Optimal. Leaf size=303 \[ -\frac {a \left (2 a^2+21 b^2\right ) \cot (c+d x)}{35 d}-\frac {3 b \left (a^2+2 b^2\right ) \tanh ^{-1}(\cos (c+d x))}{16 d}+\frac {\left (8 a^2-b^2\right ) \cot (c+d x) \csc ^4(c+d x) (a+b \sin (c+d x))^3}{35 a^2 d}+\frac {b \left (53 a^2-6 b^2\right ) \cot (c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^2}{280 a^2 d}+\frac {b \cot (c+d x) \csc ^5(c+d x) (a+b \sin (c+d x))^4}{14 a^2 d}-\frac {\left (4 a^4-19 a^2 b^2+2 b^4\right ) \cot (c+d x) \csc ^2(c+d x)}{140 a d}-\frac {b \left (105 a^4-116 a^2 b^2+12 b^4\right ) \cot (c+d x) \csc (c+d x)}{560 a^2 d}-\frac {\cot (c+d x) \csc ^6(c+d x) (a+b \sin (c+d x))^4}{7 a d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.86, antiderivative size = 303, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 8, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.276, Rules used = {2893, 3047, 3031, 3021, 2748, 3767, 8, 3770} \[ -\frac {a \left (2 a^2+21 b^2\right ) \cot (c+d x)}{35 d}-\frac {3 b \left (a^2+2 b^2\right ) \tanh ^{-1}(\cos (c+d x))}{16 d}-\frac {\left (-19 a^2 b^2+4 a^4+2 b^4\right ) \cot (c+d x) \csc ^2(c+d x)}{140 a d}-\frac {b \left (-116 a^2 b^2+105 a^4+12 b^4\right ) \cot (c+d x) \csc (c+d x)}{560 a^2 d}+\frac {\left (8 a^2-b^2\right ) \cot (c+d x) \csc ^4(c+d x) (a+b \sin (c+d x))^3}{35 a^2 d}+\frac {b \left (53 a^2-6 b^2\right ) \cot (c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^2}{280 a^2 d}+\frac {b \cot (c+d x) \csc ^5(c+d x) (a+b \sin (c+d x))^4}{14 a^2 d}-\frac {\cot (c+d x) \csc ^6(c+d x) (a+b \sin (c+d x))^4}{7 a d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2748
Rule 2893
Rule 3021
Rule 3031
Rule 3047
Rule 3767
Rule 3770
Rubi steps
\begin {align*} \int \cot ^4(c+d x) \csc ^4(c+d x) (a+b \sin (c+d x))^3 \, dx &=\frac {b \cot (c+d x) \csc ^5(c+d x) (a+b \sin (c+d x))^4}{14 a^2 d}-\frac {\cot (c+d x) \csc ^6(c+d x) (a+b \sin (c+d x))^4}{7 a d}-\frac {\int \csc ^6(c+d x) (a+b \sin (c+d x))^3 \left (6 \left (8 a^2-b^2\right )+3 a b \sin (c+d x)-3 \left (14 a^2-b^2\right ) \sin ^2(c+d x)\right ) \, dx}{42 a^2}\\ &=\frac {\left (8 a^2-b^2\right ) \cot (c+d x) \csc ^4(c+d x) (a+b \sin (c+d x))^3}{35 a^2 d}+\frac {b \cot (c+d x) \csc ^5(c+d x) (a+b \sin (c+d x))^4}{14 a^2 d}-\frac {\cot (c+d x) \csc ^6(c+d x) (a+b \sin (c+d x))^4}{7 a d}-\frac {\int \csc ^5(c+d x) (a+b \sin (c+d x))^2 \left (3 b \left (53 a^2-6 b^2\right )-6 a \left (3 a^2-b^2\right ) \sin (c+d x)-9 b \left (18 a^2-b^2\right ) \sin ^2(c+d x)\right ) \, dx}{210 a^2}\\ &=\frac {b \left (53 a^2-6 b^2\right ) \cot (c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^2}{280 a^2 d}+\frac {\left (8 a^2-b^2\right ) \cot (c+d x) \csc ^4(c+d x) (a+b \sin (c+d x))^3}{35 a^2 d}+\frac {b \cot (c+d x) \csc ^5(c+d x) (a+b \sin (c+d x))^4}{14 a^2 d}-\frac {\cot (c+d x) \csc ^6(c+d x) (a+b \sin (c+d x))^4}{7 a d}-\frac {\int \csc ^4(c+d x) (a+b \sin (c+d x)) \left (-18 \left (4 a^4-19 a^2 b^2+2 b^4\right )-3 a b \left (81 a^2-2 b^2\right ) \sin (c+d x)-3 b^2 \left (163 a^2-6 b^2\right ) \sin ^2(c+d x)\right ) \, dx}{840 a^2}\\ &=-\frac {\left (4 a^4-19 a^2 b^2+2 b^4\right ) \cot (c+d x) \csc ^2(c+d x)}{140 a d}+\frac {b \left (53 a^2-6 b^2\right ) \cot (c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^2}{280 a^2 d}+\frac {\left (8 a^2-b^2\right ) \cot (c+d x) \csc ^4(c+d x) (a+b \sin (c+d x))^3}{35 a^2 d}+\frac {b \cot (c+d x) \csc ^5(c+d x) (a+b \sin (c+d x))^4}{14 a^2 d}-\frac {\cot (c+d x) \csc ^6(c+d x) (a+b \sin (c+d x))^4}{7 a d}+\frac {\int \csc ^3(c+d x) \left (9 b \left (105 a^4-116 a^2 b^2+12 b^4\right )+72 a^3 \left (2 a^2+21 b^2\right ) \sin (c+d x)+9 b^3 \left (163 a^2-6 b^2\right ) \sin ^2(c+d x)\right ) \, dx}{2520 a^2}\\ &=-\frac {b \left (105 a^4-116 a^2 b^2+12 b^4\right ) \cot (c+d x) \csc (c+d x)}{560 a^2 d}-\frac {\left (4 a^4-19 a^2 b^2+2 b^4\right ) \cot (c+d x) \csc ^2(c+d x)}{140 a d}+\frac {b \left (53 a^2-6 b^2\right ) \cot (c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^2}{280 a^2 d}+\frac {\left (8 a^2-b^2\right ) \cot (c+d x) \csc ^4(c+d x) (a+b \sin (c+d x))^3}{35 a^2 d}+\frac {b \cot (c+d x) \csc ^5(c+d x) (a+b \sin (c+d x))^4}{14 a^2 d}-\frac {\cot (c+d x) \csc ^6(c+d x) (a+b \sin (c+d x))^4}{7 a d}+\frac {\int \csc ^2(c+d x) \left (144 a^3 \left (2 a^2+21 b^2\right )+945 a^2 b \left (a^2+2 b^2\right ) \sin (c+d x)\right ) \, dx}{5040 a^2}\\ &=-\frac {b \left (105 a^4-116 a^2 b^2+12 b^4\right ) \cot (c+d x) \csc (c+d x)}{560 a^2 d}-\frac {\left (4 a^4-19 a^2 b^2+2 b^4\right ) \cot (c+d x) \csc ^2(c+d x)}{140 a d}+\frac {b \left (53 a^2-6 b^2\right ) \cot (c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^2}{280 a^2 d}+\frac {\left (8 a^2-b^2\right ) \cot (c+d x) \csc ^4(c+d x) (a+b \sin (c+d x))^3}{35 a^2 d}+\frac {b \cot (c+d x) \csc ^5(c+d x) (a+b \sin (c+d x))^4}{14 a^2 d}-\frac {\cot (c+d x) \csc ^6(c+d x) (a+b \sin (c+d x))^4}{7 a d}+\frac {1}{16} \left (3 b \left (a^2+2 b^2\right )\right ) \int \csc (c+d x) \, dx+\frac {1}{35} \left (a \left (2 a^2+21 b^2\right )\right ) \int \csc ^2(c+d x) \, dx\\ &=-\frac {3 b \left (a^2+2 b^2\right ) \tanh ^{-1}(\cos (c+d x))}{16 d}-\frac {b \left (105 a^4-116 a^2 b^2+12 b^4\right ) \cot (c+d x) \csc (c+d x)}{560 a^2 d}-\frac {\left (4 a^4-19 a^2 b^2+2 b^4\right ) \cot (c+d x) \csc ^2(c+d x)}{140 a d}+\frac {b \left (53 a^2-6 b^2\right ) \cot (c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^2}{280 a^2 d}+\frac {\left (8 a^2-b^2\right ) \cot (c+d x) \csc ^4(c+d x) (a+b \sin (c+d x))^3}{35 a^2 d}+\frac {b \cot (c+d x) \csc ^5(c+d x) (a+b \sin (c+d x))^4}{14 a^2 d}-\frac {\cot (c+d x) \csc ^6(c+d x) (a+b \sin (c+d x))^4}{7 a d}-\frac {\left (a \left (2 a^2+21 b^2\right )\right ) \operatorname {Subst}(\int 1 \, dx,x,\cot (c+d x))}{35 d}\\ &=-\frac {3 b \left (a^2+2 b^2\right ) \tanh ^{-1}(\cos (c+d x))}{16 d}-\frac {a \left (2 a^2+21 b^2\right ) \cot (c+d x)}{35 d}-\frac {b \left (105 a^4-116 a^2 b^2+12 b^4\right ) \cot (c+d x) \csc (c+d x)}{560 a^2 d}-\frac {\left (4 a^4-19 a^2 b^2+2 b^4\right ) \cot (c+d x) \csc ^2(c+d x)}{140 a d}+\frac {b \left (53 a^2-6 b^2\right ) \cot (c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^2}{280 a^2 d}+\frac {\left (8 a^2-b^2\right ) \cot (c+d x) \csc ^4(c+d x) (a+b \sin (c+d x))^3}{35 a^2 d}+\frac {b \cot (c+d x) \csc ^5(c+d x) (a+b \sin (c+d x))^4}{14 a^2 d}-\frac {\cot (c+d x) \csc ^6(c+d x) (a+b \sin (c+d x))^4}{7 a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.97, size = 324, normalized size = 1.07 \[ -\frac {112 a^3 \cos (5 (c+d x)) \csc ^7(c+d x)-16 a^3 \cos (7 (c+d x)) \csc ^7(c+d x)+56 a \left (14 a^2-3 b^2\right ) \cos (3 (c+d x)) \csc ^7(c+d x)+70 \cot (c+d x) \csc ^6(c+d x) \left (b \left (31 a^2-18 b^2\right ) \sin (c+d x)+12 a \left (2 a^2+b^2\right )\right )-3360 a^2 b \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+3360 a^2 b \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+1540 a^2 b \sin (4 (c+d x)) \csc ^7(c+d x)+105 a^2 b \sin (6 (c+d x)) \csc ^7(c+d x)-504 a b^2 \cos (5 (c+d x)) \csc ^7(c+d x)-168 a b^2 \cos (7 (c+d x)) \csc ^7(c+d x)-6720 b^3 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+6720 b^3 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+840 b^3 \sin (4 (c+d x)) \csc ^7(c+d x)-350 b^3 \sin (6 (c+d x)) \csc ^7(c+d x)}{17920 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.63, size = 347, normalized size = 1.15 \[ -\frac {32 \, {\left (2 \, a^{3} + 21 \, a b^{2}\right )} \cos \left (d x + c\right )^{7} - 224 \, {\left (a^{3} + 3 \, a b^{2}\right )} \cos \left (d x + c\right )^{5} + 105 \, {\left ({\left (a^{2} b + 2 \, b^{3}\right )} \cos \left (d x + c\right )^{6} - 3 \, {\left (a^{2} b + 2 \, b^{3}\right )} \cos \left (d x + c\right )^{4} - a^{2} b - 2 \, b^{3} + 3 \, {\left (a^{2} b + 2 \, b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - 105 \, {\left ({\left (a^{2} b + 2 \, b^{3}\right )} \cos \left (d x + c\right )^{6} - 3 \, {\left (a^{2} b + 2 \, b^{3}\right )} \cos \left (d x + c\right )^{4} - a^{2} b - 2 \, b^{3} + 3 \, {\left (a^{2} b + 2 \, b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - 70 \, {\left ({\left (3 \, a^{2} b - 10 \, b^{3}\right )} \cos \left (d x + c\right )^{5} + 8 \, {\left (a^{2} b + 2 \, b^{3}\right )} \cos \left (d x + c\right )^{3} - 3 \, {\left (a^{2} b + 2 \, b^{3}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{1120 \, {\left (d \cos \left (d x + c\right )^{6} - 3 \, d \cos \left (d x + c\right )^{4} + 3 \, d \cos \left (d x + c\right )^{2} - d\right )} \sin \left (d x + c\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.39, size = 456, normalized size = 1.50 \[ \frac {5 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 35 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} - 7 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 84 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 105 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 70 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 35 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 420 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 105 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 560 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 105 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 840 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 840 \, {\left (a^{2} b + 2 \, b^{3}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - \frac {2178 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 4356 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 105 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 840 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} - 105 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 560 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 35 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 420 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 105 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 70 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 7 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 84 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 35 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 5 \, a^{3}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7}}}{4480 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.50, size = 309, normalized size = 1.02 \[ -\frac {a^{3} \left (\cos ^{5}\left (d x +c \right )\right )}{7 d \sin \left (d x +c \right )^{7}}-\frac {2 a^{3} \left (\cos ^{5}\left (d x +c \right )\right )}{35 d \sin \left (d x +c \right )^{5}}-\frac {a^{2} b \left (\cos ^{5}\left (d x +c \right )\right )}{2 d \sin \left (d x +c \right )^{6}}-\frac {a^{2} b \left (\cos ^{5}\left (d x +c \right )\right )}{8 d \sin \left (d x +c \right )^{4}}+\frac {a^{2} b \left (\cos ^{5}\left (d x +c \right )\right )}{16 d \sin \left (d x +c \right )^{2}}+\frac {a^{2} b \left (\cos ^{3}\left (d x +c \right )\right )}{16 d}+\frac {3 a^{2} b \cos \left (d x +c \right )}{16 d}+\frac {3 a^{2} b \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{16 d}-\frac {3 a \,b^{2} \left (\cos ^{5}\left (d x +c \right )\right )}{5 d \sin \left (d x +c \right )^{5}}-\frac {b^{3} \left (\cos ^{5}\left (d x +c \right )\right )}{4 d \sin \left (d x +c \right )^{4}}+\frac {b^{3} \left (\cos ^{5}\left (d x +c \right )\right )}{8 d \sin \left (d x +c \right )^{2}}+\frac {b^{3} \left (\cos ^{3}\left (d x +c \right )\right )}{8 d}+\frac {3 b^{3} \cos \left (d x +c \right )}{8 d}+\frac {3 b^{3} \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{8 d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.33, size = 208, normalized size = 0.69 \[ \frac {35 \, a^{2} b {\left (\frac {2 \, {\left (3 \, \cos \left (d x + c\right )^{5} + 8 \, \cos \left (d x + c\right )^{3} - 3 \, \cos \left (d x + c\right )\right )}}{\cos \left (d x + c\right )^{6} - 3 \, \cos \left (d x + c\right )^{4} + 3 \, \cos \left (d x + c\right )^{2} - 1} - 3 \, \log \left (\cos \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )} - 70 \, b^{3} {\left (\frac {2 \, {\left (5 \, \cos \left (d x + c\right )^{3} - 3 \, \cos \left (d x + c\right )\right )}}{\cos \left (d x + c\right )^{4} - 2 \, \cos \left (d x + c\right )^{2} + 1} + 3 \, \log \left (\cos \left (d x + c\right ) + 1\right ) - 3 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )} - \frac {672 \, a b^{2}}{\tan \left (d x + c\right )^{5}} - \frac {32 \, {\left (7 \, \tan \left (d x + c\right )^{2} + 5\right )} a^{3}}{\tan \left (d x + c\right )^{7}}}{1120 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 9.91, size = 359, normalized size = 1.18 \[ \frac {a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{896\,d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (\frac {a^3}{128}+\frac {3\,a\,b^2}{32}\right )}{d}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (\frac {3\,a\,b^2}{160}-\frac {a^3}{640}\right )}{d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (\frac {3\,a^2\,b}{128}+\frac {b^3}{8}\right )}{d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (\frac {3\,a^2\,b}{128}-\frac {b^3}{64}\right )}{d}+\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (\frac {3\,a^2\,b}{16}+\frac {3\,b^3}{8}\right )}{d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (\frac {12\,a\,b^2}{5}-\frac {a^3}{5}\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (a^3+12\,a\,b^2\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\left (3\,a^3+24\,a\,b^2\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (3\,a^2\,b-2\,b^3\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (3\,a^2\,b+16\,b^3\right )+\frac {a^3}{7}+a^2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{128\,d\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}+\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {3\,a^3}{128}+\frac {3\,a\,b^2}{16}\right )}{d}+\frac {a^2\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{128\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________